#!/bin/bash
set -e
set -x
MYDIR="${0%/*}"
cd "$MYDIR/.."
source "recipes/common.sh"


# RECIPE START meson
# depends: Python-native

rm -rf build/meson
mkdir -p build/meson
${xtools}${build_prefix}/bin/python3 \
	meson/packaging/create_zipapp.py \
	--outfile build/meson/meson.pyz \
	--interpreter '/usr/bin/env python3' \
	meson
chmod 755 build/meson/meson.pyz
cp -a build/meson/meson.pyz ${xtools}${build_prefix}/bin/meson
mkdir -p ${stage}${prefix}/bin
cp -a build/meson/meson.pyz "${stage}${prefix}/bin/meson"
rm -rf build/meson

# RECIPE END meson
